
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<html>
	<head>
		<%@ include file="/commons/meta.jsp"%>
	</head>

	<body>
		<table width="100%" height="100%" border="0" cellpadding="0"
			cellspacing="0">

			<tr>
				<td align="center" valign="top">
					<div id="position">
						当前位置：工单系统 - 工单管理 -
						<s:if test="id == null">添加数据</s:if>
						<s:else>修改数据</s:else>
					</div>
					<form name="form1" method="post"
						action="${ctx}/workorder/workOrder!save.action">
						<input type="hidden" name="flowId" value="${flowId}">
						<input type="hidden" name="flowClassId" value="${flowClassId}">
						<input type="hidden" name="flowOrder" value="${flowOrder}">
						<input type="hidden" name="flowStatus" value="${flowStatus}">
						<input type="hidden" name="workOrderId" value="${workOrderId}">
						<table width="95%" border="0" cellspacing="2" cellpadding="2">
							<font color="red">${msg}</font>
							<tr>
								<td class="name">
									<s:if test="id == null">添加数据</s:if>
									<s:else>修改数据</s:else>
								</td>
							</tr>
						</table>
						<table width="95%" border="0" cellspacing="1" cellpadding="2"
							bgcolor="#CEEFFF">
							<s:iterator value="view.keySet()" id="id1">
								<tr>
									<s:iterator value="id1" id="id2">
										<td bgcolor="#FFFFFF">
											<s:property value="id2" />
											&nbsp;
										</td>
									</s:iterator>
								</tr>
								<s:iterator value="view.get(#id1).keySet()" id="group">
									<tr>
										<td width="100" bgcolor="#FFFFFF">
											<div class="item">
												${group}:
											</div>
										</td>

										<td bgcolor="#FFFFFF">
											<s:iterator value="view.get(#id1).get(#group)" id="name1">
												<s:iterator value="name1" id="fname">
													<s:property value="name" />
													<s:if test="type == FIELD_TYPE_TEXT">
														<input id="${id}" name="${id}" type="text" size="10"
															value="${extendAttributes['inputValue'].value}">
													</s:if>
													<s:if test="type == FIELD_TYPE_CHECKBOX">
														<input id="${id}" name="${id}" type="checkbox" size="5" value=${id
															} <s:if test="id == extendAttributes['inputValue'].value">checked=true</s:if>>
													</s:if>
													<s:if test="type == FIELD_TYPE_RADIO">
														<input id="${checkBoxLink}" name="${checkBoxLink}" type="radio" size="5"
															value=${id
															} <s:if test="id == extendAttributes['inputValue'].value">checked=true</s:if>>
													</s:if>
													<s:if test="isMustInput == IS_MUST_INPUT_YES">
														<font color="red">*</font>
													</s:if>
													&nbsp;&nbsp;&nbsp;备注：${memo}
													<br>
												</s:iterator>
												<HR
													style="FILTER: alpha(opacity = 100, finishopacity = 0, style = 1)"
													width="100%" color=#B9EAFF SIZE=3>
											</s:iterator>
										</td>

									</tr>
								</s:iterator>
							</s:iterator>
						</table>
						<table width="95%" border="0" cellspacing="2" cellpadding="2"
							bgcolor="#CEEFFF">
							<tr>
								<td align="left">
									<s:if test="flowStatus != FLOW_STATUS_END">
										<input type="button" name="Submit2" onClick="doNext()"
											value="下一步">
									</s:if>
									<input type="button" name="Submit2" onClick="add()" value="结束">
									<input type="reset" name="Submit3" value="重置">
									<input type="button" name="Submit1" onClick="returnBack()"
										value="返回">
								</td>
							</tr>
						</table>
					</form>
				</td>
			</tr>
		</table>
		<script>
		function add(){
			${validateString}
			${'form1'}.action = "${ctx}/workorder/workOrderStep!save.action";
            ${'form1'}.submit();
		}
		function doNext(){
			${validateString}
			${'form1'}.action = "${ctx}/workorder/workOrderStep!next.action";
           	${'form1'}.submit();
		}
		function returnBack(){
			document.location="${ctx}/workorder/workOrderStep.action?workOrderId=${workOrderId}&flowClassId=${flowClassId}";
		}
		</script>
	</body>
</html>
